<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>goodsInsert - Swim System</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="/swimpool-ssm/back/resources/css/bootstrap.min.css?v=3.3.5"
	rel="stylesheet">
<link
	href="/swimpool-ssm/back/resources/css/font-awesome.min.css?v=4.4.0"
	rel="stylesheet">
<link href="/swimpool-ssm/back/resources/css/animate.min.css"
	rel="stylesheet">
<link href="/swimpool-ssm/back/resources/css/style.min.css?v=4.0.0"
	rel="stylesheet">

<script src="/swimpool-ssm/back/resources/js/jquery.min.js?v=2.1.4"></script>
<script src="/swimpool-ssm/back/resources/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/swimpool-ssm/back/resources/js/content.min.js?v=1.0.0"></script>
<script
	src="/swimpool-ssm/back/resources/js/plugins/validate/jquery.validate.min.js"></script>
<script
	src="/swimpool-ssm/back/resources/js/plugins/validate/messages_zh.min.js"></script>
<script
	src="/swimpool-ssm/back/resources/js/demo/form-validate-demo.min.js"></script>
<script src="/swimpool-ssm/js/util.js"></script>
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated">
		<div class="row">
			<div class="col-sm-11">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>Goods Insert</h5>
						<div class="ibox-tools">
							<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
							</a> <a class="dropdown-toggle" data-toggle="dropdown"
								href="form_basic.html#"> <i class="fa fa-wrench"></i>
							</a>
						</div>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="form">
							<div class="form-group">
								<label class="col-sm-3 control-label">Name：</label>
								<div class="col-sm-8">
									<input id="name" name="name" minlength="2" type="text"
										class="form-control" required="" aria-required="true">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">price：</label>
								<div class="col-sm-8">
									<input id="price" type="number" class="form-control" name="price"
										required="" aria-required="true">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">perLong：</label>
								<div class="col-sm-8">
									<input id="perLong" type="number" class="form-control"
										name="perLong">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">weekLong：</label>
								<div class="col-sm-8">
									<input id="weekLong" type="number" class="form-control"
										name="weekLong">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">peoNum：</label>
								<div class="col-sm-8">
									<input id="peoNum" type="number" class="form-control"
										name="peoNum">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">Type：</label>
								<div class="col-sm-8">
									<select name="souType" id="souType" class="form-control">
										<option value="0">class</option>
										<option value="1">member</option>
										<option value="2">age</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">status：</label>
								<div class="col-sm-8">
									<select name="status" id="status" class="form-control">
										<option value="1">enable</option>
										<option value="0">disable</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-3">
									<button class="btn btn-primary" type="button"
										onclick="formSubmit()">submit</button>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-4 col-sm-offset-3">
									<span id="info"></span>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
	/**
		提交
	*/
	function formSubmit()
	{
		var param = $("#form").serialize();
		
		$.post(
			rootPath + "/class/goodsInsert.mvc",
			param,
			function(data)
			{
				$("#info").html(data.info);
			},
			"json"
		);
		return false ; 
	}
</script>